Clinical Trials Tableau System API - Implementation Template

(0 reviews)

Setup guide

Downloading and Importing the Tableau Hyper API

This API uses the MuleSoft Tableau connector, which relies on the Tableau Java Hyper API that must be installed. Follow these instructions to install it.

  1. Download the Tableau Hyper API (Java - .zip) for the correct operating system.
  2. Extract the downloaded zip file to a location that is accessible and that you remember. Going forward, this location is referred to as hyper_api_dir.
  3. Change directories into the hyper_api_dir.
  4. Install tableauhyperapi.jar in local maven. Run the following command.
    mvn install:install-file -Dfile="lib/tableauhyperapi.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi" -Dversion="0.1" -Dpackaging="jar"
  5. Install jna-5.6.0.jar in local maven. Run the following command.
    mvn install:install-file -Dfile="lib/jna-5.6.0.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="jna-5.6.0" -Dversion="0.1" -Dpackaging="jar"
Install tableauhyperapi-\.jar in local maven

For MacOS, run this command:
mvn install:install-file -Dfile="lib/tableauhyperapi-macos.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi-os" -Dversion="0.1" -Dpackaging="jar"
For Linux, run this command:
mvn install:install-file -Dfile="lib/tableauhyperapi-linux.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi-os" -Dversion="0.1" -Dpackaging="jar"
For Windows, run this command:
mvn install:install-file -Dfile="lib/tableauhyperapi-windows.jar" -DgroupId="com.mulesoft.accelerator-lifesciences" -DartifactId="tableauhyperapi-os" -Dversion="0.1" -Dpackaging="jar"

Importing Templates into Anypoint Studio

  1. In Studio, click the Exchange X icon in the upper left of the taskbar.
  2. Log in with your Anypoint Platform credentials.
  3. Search for the template.
  4. Click Open.

Running Templates in Anypoint Studio

After you import your template into Studio, follow these configuration steps to run it:

HLS Clinical Trials Tableau System API Configuration

The application requires a few things to be configured, mainly the system API connection
information. Configure them in the properties file located in the config/properties folder.

  • mule.env is the environment where the application is to be deployed. For a studio deployment, the recommended mule.env value is local.
  • mule.key is the encryption key for securing sensitive properties.
  • tableau.apiVersion - sets the Tableau server version.
  • tableau.server - sets the Tableau server URL.
  • tableau.projectName - sets the Tableau project name to use. This can be found by logging into Tableau Server UI.
  • tableau.userName - sets the Tableau user name to use.
  • tableau.workingDirectory - sets the working directory for Tableau Hyper API. This should be set to the lib directory in the Hyper API directory. This is within the hyper_api_dir created in the Downloading and Importing the Tableau Hyper API section.
  • tableau.hyperDirectory - sets the hyper directory for Tableau Hyper API. This should be set to the lib/hyper directory in the Hyper API directory. This is within the hyper_api_dir created in the Downloading and Importing the Tableau Hyper API section.
  • tableau.password - sets the Tableau server password. It should be encrypted and configured in config-secured-<mule.env>.yaml file.

Please refer to the attached link on how to secure the configuration properties.

HTTPS Configuration

  • https.host — sets the service host interface. It should be configured in config-<mule.env>.yaml file. (Default: 0.0.0.0 for all interfaces)
  • https.port — sets the HTTPS service port number. It should be configured in config-<mule.env>.yaml file. (Default: 8082)
  • TLS Configuration - Keystore properties setup:
    • keystore.alias - sets the alias to the keystore. It should be configured in the config-<mule.env>.yaml file.
    • keystore.path - sets the path to the key file. Key should be available in /src/main/resources/keystore. It should be configured in the config-<mule.env>.yaml file.
    • keystore.keypass — sets keystore keypass to support HTTPS operation. It should be encrypted and configured in config-secured-<mule.env>.yaml file.
    • keystore.password— sets keystore password to support HTTPS operation. It should be encrypted and configured in config-secured-<mule.env>.yaml file.

Please refer to the attached link for instructions on how to generate the keystore.

Tested and verified

This solution was developed and tested on Anypoint Studio 7.15 and Mule Runtime 4.4.0.

Run it

  1. Right-click the template project folder.
  2. Hover your mouse over Run as.
  3. Click Mule Application (configure).
  4. Inside the dialog, select Environment and set the variable mule.env to the appropriate value (dev or local).
  5. Inside the dialog, select Environment and set the variable mule.key to the property encryption key that you used to encrypt your secure properties.
  6. Inside the dialog, go to Clear Application Data select always.
  7. Click Run.

Deployment instructions for CloudHub

This API cannot be deployed to CloudHub because of the dependency on the MuleSoft Tableau Connector. See the docs for the MuleSoft Tableau Connector for details.

Test the template

  • Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a Postman collection in the src/test/resources folder. Update the collection variable(s) after successful import.

Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onOct 12, 2023
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.2
1.0.1
1.0.0